<#include "/client/config.ftl"/>
<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no" />
		<title></title>
		<link rel="stylesheet" href="${base}/css/bootstrap.min.css" />
		<script type="text/javascript" src="${base}/js/jquery-1.12.0.min.js"></script>
		<link rel="stylesheet" href="${base}/css/common.css" />
	</head>

	<body>
		<div class="container-fluid">
			<fieldset disabled>
			<ul>
				<li class="list_each no_border">
					<div class="item">
						<span class="key">姓名：</span>
						<span class="value">${task.sikerName}</span>
					</div>
				</li>
				<li class="list_each no_border">
					<div class="item">
						<span class="key">所属组：</span>
						<span class="value">${task.groupName}</span>
					</div>
				</li>
				<li class="list_each no_border">
					<div class="item">
						<span class="key">任务内容：</span>
						<#if task.tsType == 1>
							<span class="value">疼痛评估任务</span>
						<#elseif task.tsType == 2>
							<span class="value">不良反应反馈任务</span>
						<#elseif task.tsType == 3>
							<span class="value">依从性评价任务</span>
						<#elseif task.tsType == 4>
							<span class="value">健康评估任务</span>
						<#elseif task.tsType == 5>
							<span class="value">滴定任务</span>
						<#else>
							<span class="value">服药提醒任务</span>
						</#if>
					</div>
				</li>
				<li class="list_each">
					<h1>使用止痛药物后有无一下反应？</h1>
				</li>
				<li class="list_each no_border">
					<div class="item_reaction">
						<span class="title">1、便秘</span>
						<span class="rea_img"><img src="${base}/image/ex.png"/></span>
						<span class="rea_qa">
							<#if task.task.isConstipation != "">
								<input type="radio" />无
								<input type="radio" checked />有，情况是：
							<#else>
								<input type="radio" checked />无
								<input type="radio" />有，情况是：
							</#if>
							<input type="text" class="form-control" value="${task.task.isConstipation}" />
						</span>
					</div>
				</li>
				<li class="list_each no_border">
					<div class="item_reaction">
						<span class="title">2、恶心、呕吐</span>
						<span class="rea_img"><img src="${base}/image/ot.png"/></span>
						<span class="rea_qa">
							<#if task.task.isNausea != "">
								<input type="radio" />无
								<input type="radio" checked />有，情况是：
							<#else>
								<input type="radio" checked />无
								<input type="radio" />有，情况是：
							</#if>
							<input type="text" class="form-control" value="${task.task.isNausea}" />
						</span>
					</div>
				</li>
				<li class="list_each no_border">
					<div class="item_reaction">
						<span class="title">3、嗜睡</span>
						<span class="rea_img"><img src="${base}/image/ss.png"/></span>
						<span class="rea_qa">
							<#if task.task.isSleep != "">
								<input type="radio" />无
								<input type="radio" checked />有，情况是：
							<#else>
								<input type="radio" checked />无
								<input type="radio" />有，情况是：
							</#if>
							<input type="text" class="form-control" value="${task.task.isSleep}" />
						</span>
					</div>
				</li>
				<li class="list_each no_border">
					<div class="item_reaction">
						<span class="title">4、眩晕</span>
						<span class="rea_img"><img src="${base}/image/yx.png"/></span>
						<span class="rea_qa">
							<#if task.task.isStun != "">
								<input type="radio" />无
								<input type="radio" checked />有，情况是：
							<#else>
								<input type="radio" checked />无
								<input type="radio" />有，情况是：
							</#if>
							<input type="text" class="form-control" value="${task.task.isStun}" />
						</span>
					</div>
				</li>
				<li class="list_each no_border">
					<div class="item_reaction">
						<span class="title">5、尿储留</span>
						<span class="rea_img"><img src="${base}/image/cl.png"/></span>
						<span class="rea_qa">
							<#if task.task.isUrine != "">
								<input type="radio" />无
								<input type="radio" checked />有，情况是：
							<#else>
								<input type="radio" checked />无
								<input type="radio" />有，情况是：
							</#if>
							<input type="text" class="form-control" value="${task.task.isUrine}" />
						</span>
					</div>
				</li>
				<li class="list_each no_border">
					<div class="item_reaction">
						<span class="title">6、肠梗阻</span>
						<span class="rea_img"><img src="${base}/image/gs.png"/></span>
						<span class="rea_qa">
							<#if task.task.isBowel != "">
								<input type="radio" />无
								<input type="radio" checked />有，情况是：
							<#else>
								<input type="radio" checked />无
								<input type="radio" />有，情况是：
							</#if>
							<input type="text" class="form-control" value="${task.task.isBowel}" />
						</span>
					</div>
				</li>
				<li class="list_each no_border">
					<div class="item_reaction">
						<span class="title">7、皮肤瘙痒</span>
						<span class="rea_img"><img src="${base}/image/sy.png"/></span>
						<span class="rea_qa">
							<#if task.task.isTickle != "">
								<input type="radio" />无
								<input type="radio" checked />有，情况是：
							<#else>
								<input type="radio" checked />无
								<input type="radio" />有，情况是：
							</#if>
							<input type="text" class="form-control" value="${task.task.isTickle}" />
						</span>
					</div>
				</li>
				<li class="list_each no_border">
					<div class="item">
						<span class="key">其他情况：</span>
						<span class="value">
							<input type="text" class="form-control" value="${task.task.other}" />
						</span>
					</div>
				</li>
				<li class="list_each no_border">
					<div class="item">
						<span class="key">处理方法：</span>
						<span class="value">
							<input type="text" class="form-control" value="${task.task.deal}" />
						</span>
					</div>
				</li>
				<li class="list_each no_border">
					<div class="item">
							<span class="key">效果：</span>
						<span class="value">
							<#if task.task.result == 0>
								<input type="radio" value="1" />好
								<input type="radio" value="0" checked />不好
							<#else>
								<input type="radio" value="1" checked />好
								<input type="radio" value="0" />不好
							</#if>
						</span>
					</div>
				</li>
				<li class="list_each no_border">
					<div class="item">
						<span class="key">执行日期：</span>
						<span class="value">${task.strDate}</span>
					</div>
				</li>
				<li class="list_each no_border">
					<div class="item">
						<span class="key">任务状态：</span>
						<#if task.status == 2>
							<span class="value">已完成</span>
						<#elseif task.status == 5>
							<span class="value">已完成（助手已阅）</span>
						<#elseif task.status == 6>
							<span class="value">已完成（药师已阅）</span>
						<#elseif task.status == 7>
							<span class="value">已完成（医生已阅）</span>
						<#elseif task.status == 9>
							<span class="value">已完成（助手、药师已阅）</span>
						<#elseif task.status == 10>
							<span class="value">已完成（助手、医生已阅）</span>
						<#elseif task.status == 11>
							<span class="value">已完成（药师、医生已阅）</span>
						<#elseif task.status == 14>
							<span class="value">已完成（助手、药师、医生已阅）</span>
						</#if>
					</div>
				</li>
			</ul>
			</fieldset>
			<#if user?exists>
			<#else>
				<#if (doctor?exists && (task.status == 7 || task.status == 10 || task.status == 11)) || (assitant?exists && (task.status == 6 || task.status == 9 || task.status == 11)) || (pharmacist?exists && (task.status == 5 || task.status == 9 || task.status == 10)) || (task.status == 14 && (doctor?exists || assitant?exists || pharmacist?exists))>
					<div class="form-group login_reg_btn mar_top mar_bottom">
						<button class="btn btn-primary" disabled>已批阅</button>
					</div>
				<#else>
					<div class="form-group login_reg_btn mar_top mar_bottom">
						<button id="checkup" class="btn btn-primary">批阅</button>
						<div class="hidden_area">
							<input type="hidden" value="${task.tsId}" id="tsId">
						</dvi>
					</div>
				</#if>
			</#if>
		</div>
		<script>
			$(document).ready(function(){
				<#if user?exists>
				<#else>
					$("#checkup").click(function(){
						var tsId = $("#tsId").val();
						$.ajax({
							type:"get",
							<#if doctor?exists>
								url:"${base}/client/task/checkupByDoctor",
							<#elseif assitant?exists>
								url:"${base}/client/task/checkupByAssi",
							<#else>
								url:"${base}/client/task/checkupByPhar",
							</#if>
							dataType:"json",
							data:{
								"tsId":tsId
							},
							success:function(data){
								if(data.result == "success"){
									alert("批阅完成");
									$("#checkup").text("已批阅");
									$("#checkup").attr("disabled","disabled");
								}else{
									alert("批阅失败");
								}
							}
						});
					});
				</#if>
			});
		</script>
	</body>

</html>